package com.yict.common.util;

import java.util.HashMap;

import com.yict.common.Constants;

public class CacheUtil {

	public static Object getCacheMap(String key) {
		if (Constants.CONFIG_MAP == null) {
			Constants.CONFIG_MAP = new HashMap<String, Object>();
		}

		return Constants.CONFIG_MAP.get(key);
	}

	public static HashMap<String, Object> setCacheMap(String key, Object object) {
		if (Constants.CONFIG_MAP == null) {
			Constants.CONFIG_MAP = new HashMap<String, Object>();
		}

		Constants.CONFIG_MAP.put(key, object);
		return Constants.CONFIG_MAP;
	}
}
